import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  mode: "history",
  routes: [
    {
      path: '/',
      component: () => import("@/views/home")
    },
    {
      path: '/tempMenu',
      name: '管理控制台',
      component: () => import("@/views/tempMenu")
    },
    {
      path: '/sourceMaterial',
      redirect: '/sourceMaterial/baseTemp',
      name: '创建模板',
      component: () => import("@/views/sourceMaterial"),
      children: [
        {
          path: '/sourceMaterial/baseTemp',
          name: '基础模板',
          component: () => import('@/views/sourceMaterial/baseTemp')
        },
        {
          path: '/sourceMaterial/readyTemp',
          name: '功能组件',
          component: () => import('@/views/sourceMaterial/readyTemp')
        },
        {
          path: '/sourceMaterial/sourceCenter',
          name: '素材中心',
          component: () => import('@/views/sourceMaterial/sourceCenter')
        }
      ]
    },
    {
      path: '/workDesk',
      name: '工作台',
      component: () => import("@/views/workDesk")
    },
  ]
})
